package test.com.newproject.framework.ui;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import butterknife.ButterKnife;

/**
 * Created by zjh on 2017/8/14.
 */

public abstract class BaseFragment extends Fragment {
    protected View contentView;

    protected abstract int obtainLayout();

    protected void initView() {
        // TODO: 2017/8/22 dothing

    }

    @Nullable
    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        contentView = inflater.inflate(obtainLayout(), null);
        ButterKnife.bind(this, contentView);
        initView();

        return contentView;
    }
}
